<script>
// import HeaderPage from "@/components/headerPage.vue";

export default {
  name: "coursePage",
  // components: {HeaderPage},
  props: {
    freecourseList: []

  },
  created() {
  },
  methods: {}
}
</script>

<template>
  <div class="coure-main">
    <ul>
      <li v-for="item in  freecourseList" :key="item.courseId">
        <router-link target="_blank" :to="'/courseDetail/'+item.courseId">
          <div class="img-box">
            <img :src="item.coverFileUrl" alt="" srcset="">
          </div>
          <div class="title-content">
            <div class="title-title"> {{ item.courseTitle }}</div>
            <!--number-->
            <div class="title-number">共{{ item.subSectionNum }}节课 | {{ item.participationsCount }}人报名</div>
            <!--类型-->
            <div class="title-type">
              <span class="title-free">免费</span>
            </div>
          </div>
        </router-link>
      </li>
    </ul>

  </div>
</template>

<style scoped lang="less">
a {
  text-decoration: none;

  color: #333;

  font-family: sans-serif;

  font-size: 12px;

}

.title-content {
  padding: 0 8px;
  font-size: 14px;

  .title-type {
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 16px;

    .title-free {
      color: #00cf8c;
    }
  }

  .title-number {
    font-weight: 500;
    color: #b7bbc4;
  }

  .title-title {
    height: auto;
    margin-bottom: 6px;
  }
}

* {
  margin: 0 auto;
}

ul {
  display: flex;
  padding: 0;

  li {
    .img-box {
      width: 100%;
      padding-top: 55%;
      position: relative;
      border-radius: 10px 10px 0 0;

      img {
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
        height: 100%;
      }

    }

    width: 19%;
    background: #fff;
    -webkit-box-shadow: 0 4px 10px 0 rgba(0, 0, 0, .15);
    box-shadow: 0 4px 10px 0 rgba(0, 0, 0, .15);
    border-radius: 10px;
    float: left;
    margin: 14px .5% 0;
  }
}
</style>
